/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ivanbiz.departement;

import com.ivanbiz.generic.GenericDAOImpl;
import org.hibernate.Query;

/**
 *
 * @author User
 */
public class DepartementDAOImpl extends GenericDAOImpl implements DepartementDAO {

    public Departement getByNamaBagian(String nama) throws Exception {
        Query query = getSessionFactory().getCurrentSession().createQuery("from Departement b where b.namaBagian=:namaBagian");
        query.setString("namaBagian", nama);
        return (Departement) query.uniqueResult();
    }

    
}
